package com.avantis.common.entity;

import com.avantis.common.entity.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @Author: tracywang
 * @Date: 2019/1/24
 * @Descrption:
 */
@Entity
@Table(name = "k_price")
@Data
public class Price extends BaseEntity implements Serializable {

    @Column
    private String name;

    @Column
    private double price;

    @JsonIgnore
    @ManyToMany(mappedBy = "prices")
    private Set<AdminUser> adminUsers = new HashSet<>();
}
